#include <iostream>
#include "PLC.h"
using namespace PLC;
using namespace std;
class A: public PLC_Function<INT>{
public:
    A(int funcID, varMap* vMap) : PLC_Function(funcID, vMap){
        this->addReturnVar<INT>();
        this->returnValue = new INT();
        ::PLC::RFM->addVarToVarMap(237,createFuncVariable<INT>(237,(new INT(0))));
    }
    void funcExecute(INT*B){
        auto* B_t = new INT(::PLC::RFM->getSymbolByID<INT*>(237));
        *B_t = *B;

        auto _B0=(*B) -((*(new INT(1)))) ;
        *this->returnValue  = (*::PLC::RFM->getSymbolByID<A*>(219)->callFunc(&_B0)) +(*B) ;
    }
    INT* callFunc(INT*B){
        funcExecute(B);
        return new INT(getFuncReturn<INT*>());
    }
};